VERSION 5.00
Object = "{C4847593-972C-11D0-9567-00A0C9273C2A}#8.0#0"; "crviewer.dll"
Begin VB.Form frmReportViewer 
   BorderStyle     =   0  'None
   ClientHeight    =   9030
   ClientLeft      =   -60
   ClientTop       =   -105
   ClientWidth     =   9765
   Icon            =   "frmReportViewer.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   9030
   ScaleWidth      =   9765
   ShowInTaskbar   =   0   'False
   Begin CRVIEWERLibCtl.CRViewer ITGReportViewer 
      Height          =   8925
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   9165
      lastProp        =   500
      _cx             =   5080
      _cy             =   5080
      DisplayGroupTree=   -1  'True
      DisplayToolbar  =   -1  'True
      EnableGroupTree =   -1  'True
      EnableNavigationControls=   -1  'True
      EnableStopButton=   -1  'True
      EnablePrintButton=   -1  'True
      EnableZoomControl=   -1  'True
      EnableCloseButton=   -1  'True
      EnableProgressControl=   -1  'True
      EnableSearchControl=   -1  'True
      EnableRefreshButton=   0   'False
      EnableDrillDown =   -1  'True
      EnableAnimationControl=   -1  'True
      EnableSelectExpertButton=   0   'False
      EnableToolbar   =   -1  'True
      DisplayBorder   =   0   'False
      DisplayTabs     =   -1  'True
      DisplayBackgroundEdge=   -1  'True
      SelectionFormula=   ""
      EnablePopupMenu =   -1  'True
      EnableExportButton=   -1  'True
      EnableSearchExpertButton=   0   'False
      EnableHelpButton=   0   'False
      LaunchHTTPHyperlinksInNewBrowser=   -1  'True
   End
End
Attribute VB_Name = "frmReportViewer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'IT Group Inc. 2005.09.23

Option Explicit

'Object variables

Public sBit As String

'Security Acess Level variables
Public lACNew As Boolean
Public lACEdit As Boolean
Public lACDelete As Boolean
Public lACPost As Boolean
Public lACCancel As Boolean
Public lACPrint As Boolean

'Activate your Toolbar Mode
Private Sub Form_Activate()
    TBBitReload
End Sub

'Release your Object
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next

    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True
    BitVisible ITGLedgerMain.tbrMain

    CloseMenuTab ITGLedgerMain

    Set frmReportViewer = Nothing
    lCloseWindow = True
    
End Sub

'Reload menu buttons (do not delete this sub)
Public Sub TBBitReload()
    BitVisible ITGLedgerMain.tbrMain
    BitReload ITGLedgerMain, Me, ITGLedgerMain.tbrMain, sBit
End Sub

'Close active window
Public Sub TBCloseWindow()
    Unload Me
End Sub

Public Sub TBFind()
    '**********
End Sub

Public Sub TBFindPrimary()
    '**********
End Sub

Private Sub Form_Load()
    

    Set FrmName = Me

    FormSetup
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True, , , True
    BitVisible ITGLedgerMain.tbrMain, True
    
'    Top = 0
'    Left = 2675
'    Height = 9800
'    Width = 12620
    
    Screen.MousePointer = vbDefault
    
End Sub

Private Sub Form_Resize()
ITGReportViewer.Top = 0
ITGReportViewer.Left = 0
ITGReportViewer.Height = ScaleHeight
ITGReportViewer.Width = ScaleWidth

End Sub

Private Sub ITGReportViewer_PrintButtonClicked(UseDefault As Boolean)
Dim rpt As Report
Dim obj As New Application
Set rpt = obj.OpenReport(App.Path & "\Crystal Reports\Transaction\" & cReceiptName & ".rpt")

    If cModule = "Gate_Pass" Then
        'Audit trail
        UpdateLogFile "Gate Pass", sID, "Printed"
        cn.Execute ("UPDATE DR SET lPrintPosted = 1 WHERE cDRNo = '" & sID & "' AND cCompanyID = '" & COID & "'")
    ElseIf cModule = "Basic_Sales_Invoice" Then
        cn.Execute ("UPDATE Sales SET lPrintPosted = 1 WHERE cInvNo = '" & Trim(InvNum) & "' AND cCompanyID = '" & COID & "'")
    ElseIf cModule = "Basic_Official_Receipt" Then
        cn.Execute ("UPDATE PR SET lPrintPosted = 1 WHERE cTranNo = '" & Trim(ORnum) & "' AND cCompanyID = '" & COID & "'")
    End If
    
rpt.PrinterSetup 0
End Sub
